/*
 * $Id$
 *
 * Copyright 2006- Revolution Health Group.  All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of Revolution Health Group.  (Confidential Information).
 * You shall not disclose such Confidential Information and shall
 * use it only in accordance with the terms of the license 
 * agreement you entered into with Revolution Health Group.
 *
 */
package org.javason.jsonrpc;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;

import org.javason.jsonrpc.JsonBean.TEST_TYPE;
import org.javason.jsonrpc.description.Param;
import org.javason.jsonrpc.description.Proc;
import org.javason.jsonrpc.description.Service;

@Service (id="urn:TestService:1.0", name="TestService", version="1.0",
		  summary="Summary Here",
		  help="http://www.revolutionhealth.com",
		  address="http://www.revolutionhealth.com/TestService")
public class AnnotatedJsonInterface {
	
	@Proc (name="doSomething", 
		   summary="doSomething Test Method", 
		   help="http://www.revolutionhealth.com")
	public JsonBean doSomething(@Param(name="testJsonBeanInput") JsonBean input) {
		System.out.println("doSomething bean = " + ReflectionToStringBuilder.toString(input));
		input.setTest("came in");
		input.setTestType(TEST_TYPE.testing);
		return input;
	}
	
	@Proc (name="doSomethingFancy")
	public Boolean doSomethingFancy(@Param(name="second") String input, 
								    @Param(name="first") Double secondInput) {
		
		System.out.println("doSomethingFancy(" + input + "," + secondInput + ")");
		return true;
	}
}
